<extend name="Public:base" />
<block name="content">
    <form method="post" id="validation-form">
        <div class="page-header">
            <a href="{:U('Coupon/CouponUseCount')}" class="btn btn-primary btn-sm radius5">返回</a>
        </div>
    <table class="table table-striped table-bordered table-hover search-form" id="nav-table">
        <thead>
        <tr>
            <th>电子券号</th>
            <th>电子券名称</th>
            <th>面值</th>
            <th>可用范围</th>
            <th>使用条件</th>
            <th>有效期</th>
            <th>类型</th>
            <th>创建时间</th>
        </tr>
            <tr>
                <volist name="self" id="vo">
                    <td>{$vo.volume_number}</td>
                    <td>{$vo.volume_name}</td>
                    <td>¥{$vo.total}</td>
                    <td>{$vo.category}</td>
                    <td>订单满{$vo.min}可用</td>
                    <td>开始时间：{$vo.start_time}<br>
                    结束时间：{$vo.end_time}</td>
                    <td>{$vo.type}</td>
                    <td>{$vo.add_time}</td>
                </volist>
            </tr>
        </thead>
    </table>
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="mytable">
            <thead>
            <tr>
                <th>编号</th>
                <th>用户姓名</th>
                <th>用户电话</th>
                <th>使用场景</th>
                <th>领取场景</th>
                <th>领取时间</th>
            </tr>
            </thead>
            <tbody>
            <volist name="coupon" id="vo">
                <tr>
                    <td>{$key+1}</td>
                    <td>{$vo.user_name}</td>
                    <td>{$vo.phone}</td>
                    <td>{$vo.get_scene}</td>
                    <td><php>echo empty($vo['use_scene'])?暂无:$vo['use_scene']</php></td>
                    <td>{$vo.add_time}</td>
                </tr>
            </volist>
            <tr>
                <td colspan="20" class="page">{$page}</td>
            </tr>
            </tbody>

        </table>
    </div>
     </form>
</block>
<block name="javascript">
    <script>
        $(function(){
            $("#search").click(function () {
                var url = $(this).attr('url');
                var query = $('.search-form').find('input,select').serialize();
                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
                query = query.replace(/^&/g, '');
                if (url.indexOf('?') > 0) {
                    url += '&' + query;
                } else {
                    url += '?' + query;
                }
                window.location.href = url;
            });

        });
    </script>
</block>